
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module userData
* @author: Hjava
* @description: SDK数据存储中心
* @since: 2018-07-19 14:06:46
*/
var UserData = /** @class */ (function () {
    function UserData() {
        this._storageMap = {};
    }
    UserData.prototype.set = function (key, value) {
        this._storageMap[key] = value;
    };
    UserData.prototype.setAll = function (obj) {
        this._storageMap = __assign(__assign({}, this._storageMap), obj);
    };
    UserData.prototype.get = function (key) {
        return this._storageMap[key];
    };
    UserData.prototype.getAll = function () {
        return __assign({}, this._storageMap);
    };
    UserData.prototype.remove = function (key) {
        this._storageMap[key] = undefined;
        delete this._storageMap[key];
    };
    UserData.prototype.removeAll = function () {
        this._storageMap = {};
    };
    return UserData;
}());
exports.default = new UserData();


//# sourceURL=webpack://MTDX/./src/core/utils/userData.ts?